package com.ctshk.sapp.system.controller;

import com.ctshk.common.annotations.OperationLogAnnotation;
import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.OperationLogModel;
import com.ctshk.common.enums.OperationLogType;
import com.ctshk.rpc.system.req.AreaAddReq;
import com.ctshk.rpc.system.req.AreaIdReq;
import com.ctshk.rpc.system.service.ISysAreaCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.ctshk.common.web.support.BaseController;

import javax.validation.Valid;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-01-11
 */
@Api(value="区域区号", tags="区号管理")
@RestController
@RequestMapping("/sys/area/code")
public class SysAreaCodeController extends BaseController {

    @DubboReference
    private ISysAreaCodeService sysAreaCodeService;

//    @ApiOperation(value = "新增国家区域", notes = "新增国家区域")
//    @OperationLogAnnotation(operModul = OperationLogModel.SYSTEM, operType = OperationLogType.ADD, operTitle = "新增国家区域", operDesc = "新增国家区域")
//    @PostMapping("/add")
//    public Result add(@RequestBody @Valid AreaAddReq areaAddReq) {
//        areaService.add(areaAddReq,getCurrentUser(getRequest()).getId());
//        return Result.success();
//    }
//
//    @ApiOperation(value = "修改国家区域", notes = "修改国家区域")
//    @OperationLogAnnotation(operModul = OperationLogModel.SYSTEM, operType = OperationLogType.UPDATE, operTitle = "修改国家区域", operDesc = "修改国家区域")
//    @PostMapping("/update")
//    public Result update(@RequestBody @Valid AreaAddReq areaAddReq) {
//        areaService.update(areaAddReq,getCurrentUser(getRequest()).getId());
//        return Result.success();
//    }
//
//    @ApiOperation(value = "删除国家区域", notes = "删除国家区域")
//    @OperationLogAnnotation(operModul = OperationLogModel.SYSTEM, operType = OperationLogType.DELETE, operTitle = "删除国家区域", operDesc = "删除国家区域")
//    @PostMapping("/delete")
//    public Result delete(@RequestBody @Valid AreaIdReq areaIdReq) {
//        areaService.delete(areaIdReq,getCurrentUser(getRequest()).getId());
//        return Result.success();
//    }

}
